Skip to content

Conversation

ghost
Copy link

@ghost ghost commented Oct 24, 2021

Follow up to #89216

@rust-highfive
Copy link
Contributor

r? @yaahc

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 24, 2021
@ghost
Copy link
Author

ghost commented Oct 24, 2021

Now that I look at it closer, isn't there an 'O' missing here in https://github.com/rust-lang/rust/blob/master/library/alloc/src/collections/btree/map.rs#L39 for (log2n)? In that case I could fix that up in this PR too.

@fee1-dead
Copy link
Member

fee1-dead commented Oct 27, 2021

Was this supposed to be big O? I think expressing it like "B * log(n) comparisons" is fine.

Also, the line you linked is correct.

a perfectly balanced BST performs the theoretical minimum amount of comparisons necessary to find an element (log2n).

@ghost
Copy link
Author

ghost commented Oct 27, 2021

@fee1-dead Alright, that's cleared up then! I removed the big O notation.

@fee1-dead
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Oct 27, 2021

📌 Commit b1b4c6c has been approved by fee1-dead

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 27, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 27, 2021
…askrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#90239 (Consistent big O notation in map.rs)
 - rust-lang#90267 (fix: inner attribute followed by outer attribute causing ICE)
 - rust-lang#90288 (Add hint for people missing `TryFrom`, `TryInto`, `FromIterator` import pre-2021)
 - rust-lang#90304 (Add regression test for rust-lang#75961)
 - rust-lang#90344 (Add tracking issue number to const_cstr_unchecked)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 088dc91 into rust-lang:master Oct 27, 2021
@rustbot rustbot added this to the 1.58.0 milestone Oct 27, 2021
@bors
Copy link
Collaborator

bors commented Oct 27, 2021

⌛ Testing commit b1b4c6c with merge 4e0d397...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants